package com.bdqn.t382.mapper.storageRecord;

import com.bdqn.t382.pojo.StorageRecord;
import com.bdqn.t382.pojo.Supplier;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StorageRecordMapper {

    //根据商品名称（模糊匹配)、供货商 ID、支付状态三个条件查询入库记录。查询结果
    public List<StorageRecord> getStorageRecordList(@Param("goodsName") String goodsName, @Param("supplierId") int supplierId, @Param("payStatus") int payStatus);
   //查询，增加字段
    public List<StorageRecord> getStorageRecordListWithSupplierName(StorageRecord storageRecord);

    public List<StorageRecord> getStorageRecordListBySupplierId(@Param("goodsName") String goodsName, @Param("supplierId") int supplierId, @Param("payStatus") int payStatus);

    // 根据指定的供货商ID查询供货商信息及相关入库记录
    public Supplier getSupplierAndStorageRecordsBySupplierId(@Param("supplierId") int supplierId);
   //根据供货商 ID、支付状态、商品名称 (模糊匹配) 为条件查询入库单记录表
    public List<StorageRecord> getStorageRecordListByIf(@Param("goodsName") String goodsName, @Param("supplierId") Integer supplierId, @Param("payStatus") Integer payStatus);

    public List<StorageRecord> getStorageRecordListBySupplierIdArray(Integer[] supplierIds);

    public List<StorageRecord> getStorageRecordListBySupplierIdList(List<Integer> supplierIds);
   //分页查询功能
    public List<StorageRecord> selectPageList(@Param("pageBegin") Integer pageBegin, @Param("pageSize") Integer pageSize);
}
